package com.qing.library_manager.service.manager.borrow;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qing.library_manager.domain.dto.BorrowAllDTO;
import com.qing.library_manager.domain.dto.BorrowDTO;
import com.qing.library_manager.domain.entity.Borrow;
import com.qing.library_manager.common.util.ResponseResult;
import com.qing.library_manager.domain.query.BorrowByPageQuery;
import com.qing.library_manager.domain.query.BorrowQuery;
import com.qing.library_manager.domain.query.BorrowUpdateQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface borrowService extends IService<Borrow> {

    /**
     * 添加借阅信息
     * @param borrowQuery
     * @return
     */
    ResponseResult addBorrow(BorrowQuery borrowQuery);

    /**
     * 删除借阅信息
     * @param borrowShowId
     * @return
     */
    ResponseResult deleteBorrow(int borrowShowId);

    /**
     * 查询读者借阅情况
     * @param readersName
     * @return
     */
    ResponseResult queryBorrowByInit(String readersName);

    /**
     * 归还图书功能
     * @param borrowShowId
     * @return
     */
    ResponseResult borrowReturn(int borrowShowId);

    /**
     * 根据特定条件搜索
     * @return
     */
    ResponseResult queryBorrowByName(String readersName,String bookName);

    /**
     *  更新借阅信息
     * @param borrowUpdateQuery
     * @return
     */
    ResponseResult updateBorrowInfo(BorrowUpdateQuery borrowUpdateQuery);

    /**
     * 分页查询数据
     * @param pageNum
     * @param pageSize
     * @param borrowByPageQuery
     * @return
     */
    ResponseResult queryBorrowByPage(int pageNum,int pageSize,BorrowByPageQuery borrowByPageQuery);

    /**
     * 根据id查询信息
     * @param borrowShowId
     * @return
     */
    ResponseResult queryBorrowById(int borrowShowId);

    /**
     * 获取全部借阅信息
     * @return
     */
    ResponseResult queryAllBorrow();

}
